<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>有声书Vip下载</title>
    <link rel="shortcut icon" href="down/img/format.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="down/css/style.css">
</head>
<body>
    <div class="head">
        <span class="headline">喜马拉雅有声书下载</span>
    </div>
    <div class="main">
        <form>
            <input id="bookName" type="text"  placeholder="请输入想听的书籍名字:">
            <br>
            <input id="but" type="submit" value="提交">
        </form>
    </div>
</body>
<script type="text/javascript" src="down/js/jquery-3.4.1.js"></script>
<script>
    $("#but").click(function () {
        var attr = $("#bookName").val();
        console.log("书籍名称:"+attr)
        $.ajax({
            url:'DownAudioBook/downAudioBookParam',
            type:'post',
            dataType:"json",
            data:{param:attr},
            contentType: "application/json; charset=utf-8",
            async: false,
            success:function (data) {
                alert("正在下载请稍后。。。。"+data)
            },
            error:function () {
                alert("下载失败")
            }
        })
    });
</script>
</html>